/*
 *  Jun 16, 2009
 */

package app;

/**
 *
 * @author thirdy
 */
public class ThesisConstants {

    public final static String SMSPORT = "1234";
    public final static String APPID = "Nirvana";
    public final static String RMS_SRVR_SETTINGS_NAME = "thsSttngs";
    public final static String RMS_CLNT_SETTINGS_NAME = "thsCSttngs";
    public final static String BOOLEAN_T = "true";
    public final static String BOOLEAN_F = "false";
    public final static String EMPTY = "";

    // settings
    public final static String SETTINGS_SAVED_MSG = "Settings saved";
    public final static int SETTINGS_FLAG_SIZE = 3;
    public final static int IDX_CONFIRM_RECIV_REQ = 0;
    public final static int IDX_CONFIRM_MMS_SENT = 1;
    public final static int IDX_SERVER_ERRORS = 2;

    public final static String CONFIRM_REQ_RECIV_MSG = "Request Received";
    public final static String CONFIRM_MMS_SENT_MSG = "MMS Sent";
    public final static String CONFIRM_SERVER_ERRORS_MSG = "An error occured in Server";
    
    // commands
    public final static String REC3SEC = "Record for 3 sec";
    public final static String REC5SEC = "Record for 5 sec";
    public final static String REC10SEC = "Record for 10 sec";

    // time intervals
    public final static String TI = "Time Interval - ";
    public final static String TI5MIN = "5 min";
    public final static String TI10MIN = "10 min";
    public final static String TI15MIN = "15 min";
    public final static String TI30MIN = "30 min";
    public final static String TI45MIN = "45 min";
    public final static String TI60MIN = "1 hr";
    public final static String TI120MIN = "2 hrs";
    public final static String TI180MIN = "3 hrs";
    public final static String TI240MIN = "4 hrs";
    public final static String TI360MIN = "6 hrs";
    
    public static String getTimeIntervalStr(int value){
        switch(value){
            case 0: return TI + TI5MIN;
            case 1: return TI + TI10MIN;
            case 2: return TI + TI15MIN;
            case 3: return TI + TI30MIN;
            case 4: return TI + TI45MIN;
            case 5: return TI + TI60MIN;
            case 6: return TI + TI120MIN;
            case 7: return TI + TI180MIN;
            case 8: return TI + TI240MIN;
            case 9: return TI + TI360MIN;
        }
        return "ERROR";
    }

    public static int getTimeIntervalSec(int value) {
         switch(value){
            case 0: return 300;
            case 1: return 600;
            case 2: return 900;
            case 3: return 1800;
            case 4: return 2700;
            case 5: return 3600;
            case 6: return 7200;
            case 7: return 10800;
            case 8: return 14400;
            case 9: return 21600;
        }
         return 0;
    }

    public static int getChoiceDurationFromCGIdx(int idx){
        switch(idx){
            case 0: return 3;
            case 1: return 5;
            case 2: return 10;
        }
        return -1;
    }


}
